package 设计模式.prototype.deepclone;

public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {
        DeepProtoType p=new DeepProtoType();
        p.name="宋江";
        p.deepCloneableTarget=new DeepCloneableTarget("66","66d33");

        DeepProtoType p2=(DeepProtoType) p.clone();
        System.out.println("p.name"+p.name+"p.deepTarget="+p.deepCloneableTarget.hashCode());
        System.out.println("p.name"+p2.name+"p.deepTarget="+p2.deepCloneableTarget.hashCode());

        DeepProtoType p3=(DeepProtoType) p.deepClone();
        System.out.println("p.name="+p.name+"p.deepTarget="+p.deepCloneableTarget.hashCode());
        System.out.println("p3.name="+p3.name+"p3.deepTarget="+p3.deepCloneableTarget.hashCode());
    }
}
